import { RouteRecordRaw } from 'vue-router';

export const alarmRouter: RouteRecordRaw = {
  path: '/alarm',
  name: 'alarm',
  component: () => import('@/layout/routerView/parent.vue'),
  redirect: '/alarm/gdth',
  meta: {
    title: '预警分析',
    isLink: '',
    isHide: false,
    isKeepAlive: true,
    isAffix: false,
    isIframe: false,
    roles: ['admin', 'common'],
    icon: 'iconfont icon-crew_feature',
  },
  children: [
    {
      path: '/alarm/gdth',
      name: 'alarmGdth',
      component: () => import('@/layout/routerView/parent.vue'),
      redirect: '/alarm/gdth/bs',
      meta: {
        title: '耕地退化预警',
        isLink: '',
        isHide: false,
        isKeepAlive: true,
        isAffix: false,
        isIframe: false,
        roles: ['admin', 'common'],
        icon: 'iconfont icon-crew_feature',
      },
      children: [
        {
          path: '/alarm/gdth/bs',
          name: 'alarmGdthBs',
          component: () => import('@/views/alarm/gdth/bs/index.vue'),
          meta: {
            title: '土壤变瘦预警',
            isLink: '',
            isHide: false,
            isKeepAlive: true,
            isAffix: false,
            isIframe: false,
            roles: ['admin', 'common'],
            icon: '',
          },
        },
        {
          path: '/alarm/gdth/bb',
          name: 'alarmGdthBB',
          component: () => import('@/views/alarm/gdth/bb/index.vue'),
          meta: {
            title: '土壤变薄预警',
            isLink: '',
            isHide: false,
            isKeepAlive: true,
            isAffix: false,
            isIframe: false,
            roles: ['admin', 'common'],
            icon: '',
          },
        },
        {
          path: '/alarm/gdth/by',
          name: 'alarmGdthBY',
          component: () => import('@/views/alarm/gdth/by/index.vue'),
          meta: {
            title: '土壤变硬预警',
            isLink: '',
            isHide: false,
            isKeepAlive: true,
            isAffix: false,
            isIframe: false,
            roles: ['admin', 'common'],
            icon: '',
          },
        },
        {
          path: '/alarm/gdth/yjz',
          name: 'alarmGdthYjz',
          component: () => import('@/views/alarm/gdth/bs/index.vue'),
          meta: {
            title: '有机值风险预警',
            isLink: '',
            isHide: false,
            isKeepAlive: true,
            isAffix: false,
            isIframe: false,
            roles: ['admin', 'common'],
            icon: '',
          },
        },
        {
          path: '/alarm/gdth/result',
          name: 'alarmResult',
          component: () => import('@/views/alarm/gdth/result.vue'),
          meta: {
            title: '预警结果',
            isLink: '',
            isHide: true,
            isKeepAlive: true,
            isAffix: false,
            isIframe: false,
            roles: ['admin', 'common'],
            icon: '',
          },
        },
      ],
    },
  ],
};
